package cn.ligoo.dtu.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ligoo.dtu.dao.UserInfoDao;
import cn.ligoo.dtu.domain.UserInfo;
import cn.ligoo.dtu.service.UserInfoService;

/**
 * @author Jin,QingHua
 * @version 2012-07-24 12:18:52
 */
@Service
public class UserInfoServiceImpl implements UserInfoService {

	@Resource
	private UserInfoDao userInfoDao;

	@Override
	public Integer createUserInfo(UserInfo t) {
		this.userInfoDao.insertEntity(t);
		return t.getId();
	}

	@Override
	public int modifyUserInfo(UserInfo t) {
		this.userInfoDao.updateEntity(t);
		return t.getId();
	}

	@Override
	public int removeUserInfo(UserInfo t) {
		return this.userInfoDao.deleteEntity(t);
	}

	@Override
	public UserInfo getUserInfo(UserInfo t) {
		return this.userInfoDao.selectEntity(t);
	}

	@Override
	public Integer getUserInfoCount(UserInfo t) {
		return this.userInfoDao.selectEntityCount(t);
	}

	@Override
	public List<UserInfo> getUserInfoList(UserInfo t) {
		return this.userInfoDao.selectEntityList(t);
	}

}
